package com.example.blogserver.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.blogserver.a_utils.ResponseBodyMessage;
import com.example.blogserver.pojo.User;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @description
 * @descriptionDetail
 * @Author B3300
 * @copyright 摸鱼王胖嘟嘟
 * @Date 2024/3/19 21:58
 */
public interface AdminService extends IService<User> {

    /**
     * 获取当前登录用户
     */
    ResponseBodyMessage<User> getNowUser(HttpServletRequest request);

    /**
     * 获取所有用户信息
     */
    ResponseBodyMessage<List<User>> queryUserAll(HttpServletRequest request);

    /**
     * 分页查找
     */
    ResponseBodyMessage<Page> page(int page, int pageSize);

    /**
     * 修改用户的身份权限
     */
    ResponseBodyMessage<Boolean> updateIdentityByUserId(HttpServletRequest request, int identity, String id);

}
